<template>
	<view>
		<view class="header">
			<image src="/static/成功.png" mode="" class="icon"></image>
			<view class="state">提交成功</view>
			<view class="tips">您的申请以提交，正在等待医生审核</view>
		</view>
	</view>


	<button class="button" type="primary" @click="toDetail">查看预约详情</button>
	<button class="button" type="default" @click="openHome ">返回首页</button>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app';
	import {
		ref
	} from 'vue';

	const serviceId = ref('')

	onLoad((options) => {
		serviceId.value = options._id
	})

	function openHome() {
		uni.switchTab({
			url: '/pages/home/home'
		})
	}

	function toDetail() {
		uni.navigateTo({
			url: `/serviceStep/pages/serviceDetail/serviceDetail?_id=${serviceId.value}`
		})
	}
</script>

<style scoped lang="scss">
	.icon {
		width: 80rpx;
		height: 80rpx;
		margin: auto;
	}

	.header {
		margin-top: 50rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.state {
		margin: 30rpx 0;
		font-size: 40rpx;
		color: rgb(51, 51, 51);
	}

	.tips {
		font-size: 26rpx;
		color: rgb(153, 153, 153);
		margin-bottom: 40rpx;
	}

	.button {
		width: 670rpx;
		height: 88rpx;
		margin: 20rpx auto;
	}
</style>